Know to delete attributes?

I've got a couple nice Attribute Report scripts that I figure to merge and enhance; one purpose of the big script is to find attributes in the various modules that are potential candidates for deletion. The script of course would not delete the attributes, just bring their features to the attention of the person.

Need opinion; what sorts of objective criteria that I can gather from the various modules that would help identify such attributes that are potential candidates for deletion? I've come up with:

The need to retain an attribute appears to drop when:

[1] There are few or no objects that actually have values for that attribute.
[2] Looking through History of Baselines, no attr-value has changed for a long time.
[3] There is a short period of time between attribute creation and last modified obj-attr value.
That is, it looks like created then set then ignored.
[4] There are few or no views containing the attribute.

I understand the problem of renamed attributes and History; not sure what to do about that.

If you can think of something else that might help, please let me know.

>Louie
llandale - Mon Mar 02 14:20:51 EST 2009

Re: Know to delete attributes?
kbmurphy - Mon Mar 02 14:27:33 EST 2009

Louie,

While this is obvious to you, it probably wouldn't be to someone else--is it an object or module attribute? If it's a module attribute, does it matter?

Also, you want to ignore system attributes. Again, I know you know....

Re: Know to delete attributes?
dpechacek - Fri Mar 06 09:43:48 EST 2009

Louie your list looks good to me. Only thing that could possibly pop into my head is when looking at how long it's been since the attribute was last modified, compare the time between when the module was last modified and when the attribute was last modified. Not compared to the current date. I don't know if you plan to only run this on active projects, but if not, this would remove a lot of false positives.

AAI Services, Textron
dpechacek@sc-aaicorp.com
David.Pechacek@gmail.com